package com.ctms.system.dao;

import com.ctms.system.domain.CourseDO;
import com.ctms.system.domain.CourseStuAmountDO;
import com.ctms.system.domain.CourseStudentDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface CourseStudentMapper {
    //学生选课
    List<CourseDO> selectAllCourse(Map<String, Object> params);
    int countAllCourse(Map<String, Object> params);
    //学生选课后插入课程学生表
    Integer insertCourseStudent(CourseStudentDO courseStudentDO);


    //查找学生已选课程
    List<CourseDO> selectStuCourse(Map<String, Object> params);
    int count(Map<String, Object> params);

    //删除已选课程
    int deleteStuCourse(Integer cid);

    //生成柱状图
    List<CourseStuAmountDO> countAmount();

    //打卡列表
    List<CourseStudentDO> selectAllCard(Map<String, Object> params);
    int countAllCard(Map<String, Object> params);

    //打卡动作
    CourseStudentDO selectById(Integer id);
    int updateCard(CourseStudentDO courseStudentDO);
    CourseStudentDO selectCourseStuScore(@Param("cid")Integer cid, @Param("userId")Integer userId);
}
